/**
 * DataManager
 * @Author ace.ch
 * @Date 2018/4/8 18:02
 */
class DataManager extends NotifyEvent {

    constructor() {
        super();
    }

    //获取菜单功能的对应资源(菜单资源前缀menu_   菜单特效资源前缀effect_)
    getAction2Res(action: number) {
        let src: string = '';
        switch (action) {
            case 0:
                src += 'guo';
                break;
            case 1:
                src += 'chi';
                break;
            case 2:
                src += 'peng';
                break;
            case 4:
                src += 'ting';
                break;
            case 22:
            case 23:
            case 24:
            case 25:
            case 26:
                src += 'gang';
                break;
            case 27:
            case 28:
                src += 'budan';
                break;
            case 98:
                src += 'dianpao';
                break;
            case 99:
                src += 'hu';
                break;
        }

        return src != "" ? src : null;
    }

    //获取菜单功能索引值的对应资源(菜单资源前缀menu_   菜单特效资源前缀effect_)
    getIndex2Res(action: number) {
        let src: string = '';
        switch (action) {
            case 0:
                src += 'guo';
                break;
            case 1:
                src += 'chi';
                break;
            case 2:
                src += 'peng';
                break;
            case 3:
                src += 'gang';
                break;
            case 5:
                src += 'ting';
                break;
            case 4:
                src += 'budan';
                break;
            case 6:
                src += 'hu';
                break;
        }

        return src != "" ? src : null;
    }
}